OPC Studio User's Guide and Reference
StreamLoader<TValue> Constructor(Func<Stream,ValueResult<TValue>>)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.IO Namespace > StreamLoader<TValue> Class > StreamLoader<TValue> Constructor : StreamLoader<TValue> Constructor(Func<Stream,ValueResult<TValue>>)
The function that reads the value from the stream.

The value of this parameter cannot be null (Nothing in Visual Basic).

Initializes a new instance of the class, given the function to read the value from the stream.
Syntax
'Declaration
 
Public Function New( _
   ByVal fromStreamFunction As Func(Of Stream,ValueResult(Of TValue)) _
)
'Usage
 
Dim fromStreamFunction As Func(Of Stream,ValueResult(Of TValue))
 
Dim instance As New StreamLoader(Of TValue)(fromStreamFunction)
public StreamLoader<TValue>( 
   Func<Stream,ValueResult<TValue>> fromStreamFunction
)

Parameters

fromStreamFunction
The function that reads the value from the stream.

The value of this parameter cannot be null (Nothing in Visual Basic).

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also